<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="${ctx}/js/jquery-1.4.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function() {		
		
		
	});
</script>
<title>Insert title here</title>
</head>
<body>
	<h1>Transaction Update</h1>
	<hr/>
    <form action="update.action" method="post">
	<table width="868" border="1">
	  <tr>
	    <td width="88">Pin Number:</td>
	    <td width="299">${transaction.pin}</td>
	    <td colspan="2"><strong>Sender Information</strong></td>
      </tr>
	  <tr>
	    <td>Product:</td>
	    
	    <td>${transaction.product.name }</td>
	    <td width="120">Name:</td>
	    <td width="333">${transaction.senderFirstName }&nbsp;${transaction.senderMidName }&nbsp;${transaction.senderLastName }</td>
      </tr>
	  <tr>
	    <td>Discount Number</td>	    
	    <td>${transaction.discount.discountNo}</td>	    	    
	    <td>Country:</td>
	    <td>${transaction.senderCountry}</td>
      </tr>
	  <tr>
	    <td>Date:</td>
	    <td>${transaction.createDate}</td>
	    <td>State/Province:</td>
	    <td>${transaction.senderState}</td>
      </tr>
	  <tr>
	    <td>Destination Address:</td>
	    <td>${transaction.receiverAddress},${transaction.receiverState},${transaction.receiverCountry}</td>
	    <td>City:</td>
	    <td>${transaction.senderCountry}</td>
      </tr>
	  <tr>
	    <td>Receiver name:</td>
	    <td>${transaction.receiverFirstName}&nbsp;${transaction.receiverMidName}&nbsp;${transaction.reciverLastName}</td>
	    <td>Address:</td>
	    <td>${transaction.senderAddress},${transaction.senderCity},${transaction.senderState},${transaction.senderCountry}</td>
      </tr>
	  <tr>
	    <td>Receiver mobilephone:</td>
	    <td>${transaction.receiverMobile}</td>
	    <td>Zipcode:</td>
	    <td>${transaction.zip}</td>
      </tr>
	  <tr>
	    <td>Amount:</td>
	    <td>${transaction.amount}</td>
	    <td>Email</td>
	    <td>${transaction.email}</td>
      </tr>
	  <tr>
	    <td>Price:</td>
	    <td>${transaction.price}</td>
	    <td>Mobilephone:</td>
	    <td>${transaction.senderMobile}</td>
      </tr>
	  <tr>
	    <td>Total  Price:</td>
	    <td>${totalPrice }</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
      </tr>
	  <tr>
	    <td>Transaction Status:</td>
	    <td>${transaction.status}
	    	<s:select label="status"
		       name="status"
		       list="#{'0':'UNPAID', '1':'PAID', '2':'SENT', '3':'RECEIVED', '4':'CANCELLED'}"
		       multiple="false"
		       required="true"
		       value="transaction.status"
			/>    
	    </td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
      </tr>
	</table> 
    <p>
      <input type="hidden" name="id" value="${transaction.id }">
      <input type="submit" name="button" id="updateBtn" value="Save">
      <input type="submit" name="button2" id="button2" value="Cancel">
      </p>
    </form>

</body>
</html>